package com.koron.ticket.spotcheck.Spotcheckmapper;

import com.koron.ticket.spotcheck.bean.TicketSpotcheckBean;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: rocky
 * @Date: 2022/1/25 11:54
*/
public interface TicketSpotcheckMapper {
    int deleteByPrimaryKey(String id);

    int insert(TicketSpotcheckBean record);

    int insertOrUpdate(TicketSpotcheckBean record);

    int insertOrUpdateSelective(TicketSpotcheckBean record);

    int insertSelective(TicketSpotcheckBean record);

    TicketSpotcheckBean selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(TicketSpotcheckBean record);

    int updateByPrimaryKey(TicketSpotcheckBean record);

    /**
     * 更新 工作票 抽查结果
     * @param checkResults
     * @param id
     * @return
     */
    int workUpdateCheckResultsById(@Param("checkResults")Boolean checkResults, @Param("id")String id);

    /**
     * 更新 操作票 抽查结果
     * @param checkResults
     * @param id
     * @return
     */
    int operationUpdateCheckResultsById(@Param("checkResults")Boolean checkResults, @Param("id")String id);

    /**
     * 获取票据所有抽查记录
     * @param ticketId
     * @return
     */
    List<TicketSpotcheckBean> queryByTicketIdOrderByCreateTime(@Param("ticketId")String ticketId);

    /**
     * 获取抽查最新抽查人的帐号
     * @param ticketId
     * @return
     */
    String queryAccountByTicketIdOrderByCreateTime(@Param("ticketId")String ticketId);



}
